package client.view;

import javax.swing.JLabel;
import javax.swing.JPanel;

import client.AccountProxy;


/**
 * A visualization of an Account for the Account list in the MasterServerView.
 * Displays the name associated with the user's account.
 */
public class AccountProxyView extends JPanel
{
	private AccountProxy ap;
	/**
	 * Create a new view for the given AccountProxy model
	 */
	public AccountProxyView(AccountProxy a)
	{
		ap = a;
		createInterface();
	}
	/**
	 * Create the interface for the AccountProxyView
	 */
	private void createInterface() {
		this.add(new JLabel(ap.getUserName()));
	}
	/**
	 * Return the AccountProxy model associated with this AccountProxyView
	 */
	public AccountProxy getAccountProxy()
	{
		return ap;
	}
}
